<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@page import="com.wenwu.common.utils.Uploader"%>
<%
    request.setCharacterEncoding("utf-8");
    response.setCharacterEncoding("utf-8");
    request.setAttribute("fileBasePath", "http://localhost:1888");
    Uploader up = new Uploader(request);
    up.setSavePath("D:/Relics/upload/file"); //保存路径
    String[] fileType = {".rar" , ".doc" , ".docx" , ".zip" , ".pdf" , ".txt" , ".swf", ".wmv",".xls",".xlsx"};  //允许的文件类型
    up.setAllowFiles(fileType);
    up.setMaxSize(512000);        //允许的文件最大尺寸，单位KB(500MB)
    up.absoluteUpload();
    response.getWriter().print("{'url':'"+up.getUrl()+"','fileType':'"+up.getType()+"','state':'"+up.getState()+"','original':'"+up.getOriginalName()+"'}");
%>
